package 抽象工厂;

import 抽象工厂.形状.Shape;
import 抽象工厂.颜色.Blue;
import 抽象工厂.颜色.Color;
import 抽象工厂.颜色.Green;
import 抽象工厂.颜色.Red;

/**
 * @author wz<br>
 * @version 1.0<br>
 * @ClassName ColorFactory
 * @<Description> TODO
 * @date 2021/12/7 18:00<br>
 */
public class ColorFactory extends AbstarctFactory{

  public Color getColor(String color) {
    if(color == null){
      return null;
    }
    if(color.equalsIgnoreCase("RED")){
      return new Red();
    } else if(color.equalsIgnoreCase("GREEN")){
      return new Green();
    } else if(color.equalsIgnoreCase("BLUE")){
      return new Blue();
    }
    return null;
  }

  public Shape getShape(String shape) {
    return null;
  }
}
